package com.pk.platform.business.data.web;

import com.pk.platform.business.core.web.GenericAction;
import com.pk.platform.business.data.service.IBackupService;

public class BackupAction extends GenericAction {

	private IBackupService backupService;
	
	public String backupManage()
	{
		return SUCCESS;
	}

	public String backupData()
	{
		String filePath = backupService.backupData();
		this.sendRedirect("inner/core/download.action?absoluteFilePath=" + filePath + "&attachmentFileName=backup.zip");
		return SUCCESS;
	}

	public IBackupService getBackupService() {
		return backupService;
	}

	public void setBackupService(IBackupService backupService) {
		this.backupService = backupService;
	}
	
}
